package com.topscomm.qem;

import com.topscomm.cbo.pojo.CboMessageAppEntity;
import com.topscomm.cbo.pojo.CboMessageSysEntity;
import com.topscomm.pub.util.StringBufferProxy;
import com.topscomm.tap.ITapService;

import java.util.Map;
import java.util.function.UnaryOperator;

public interface IQemService<T, TDao> extends ITapService<T, TDao> {


    /**
     * @description: 生成系统通知Map
     * @author: chengengwei
     * @date: 2021-01-04
     * @modify: extendfield1 为title
     */
    CboMessageSysEntity createSysMessageMap(String senderUserCode, String senderUserName, String receiveUserCode, String receiveUserName, String title, String content, long sourceid,
                                            String sourcetype);

    /**
     * @description: 生成APP通知Map
     * @author: chengengwei
     * @date: 2021-01-04
     * @param sendtype app发送方式 0 为 单推 1 为 allpush AppSendTypeEnum
     * @modify:
     */
    CboMessageAppEntity createAppMessageMap(String usercode, String subject, String content,
                                            long sourceid, String sourcetype, int sendtype);

    StringBufferProxy appendSql(Map<String, Object> paraMap, StringBufferProxy sql, String paramName, String template, UnaryOperator<String> handleParam);

    /**
     * @param mapRow        实体属性map
     * @param fieldName     字段名称
     * @param dispFieldName 字段显示值名称
     * @return 处理后的显示值
     * @throws
     * @author xinfushuo
     * @date 2023/1/9
     * @modify
     */
    void setDispField(Map<String, Object> mapRow, String fieldName, String dispFieldName, UnaryOperator<String> handleField);

    void setDispField(Map<String, Object> mapRow, String fieldName, UnaryOperator<String> handleField);
}

